//
//  AFTool.h
//  JinYong_iOS_Store
//
//  Created by 王厚一 on 2017/10/17.
//  Copyright © 2017年 why. All rights reserved.
//

#import <Foundation/Foundation.h>

typedef void (^successBlock)(NSDictionary *result);
typedef void (^failureBlock)(NSError *error);

@interface AFTool : NSObject

+ (void)getWithURL:(NSString *)url params:(NSDictionary *)params  success:(successBlock)success failure:(failureBlock)failure;
+ (void)postWithURL:(NSString *)url params:(NSDictionary *)params success:(successBlock)success failure:(failureBlock)failure;

+ (void)postDataWithURL:(NSString *)url params:(NSDictionary *)params data:(NSData *)data imageName:(NSString *)imageName success:(successBlock)success failure:(failureBlock)failure;

+ (void)postDataWithURL:(NSString *)url params:(NSDictionary *)params datas:(NSArray *)datas imageName:(NSString *)imageName success:(successBlock)success failure:(failureBlock)failure;

@end
